using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Monkey_Ads1 : MonoBehaviour
{
    [SerializeField]
    Light m_Light;

    Material material;
    Vector3 angleVec;

    // Start is called before the first frame update
    void Start()
    {
        material = GetComponent<MeshRenderer>().material;
        angleVec = transform.localEulerAngles;
    }

    // Update is called once per frame
    void Update()
    {
        material.SetVector("_lightDir", -m_Light.transform.forward);
        angleVec.y += 0.1f;
        if(angleVec.y > 360)
        {
            angleVec.y -= 360;
        }
        transform.localEulerAngles = angleVec;
    }
}
